package com.eelpo.cmmp.core.wicket.panel.container;

import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.model.Model;

/**
 * <pre>
 * 
 * 简单容器
 * 
 * </pre>
 * 
 * @author <a href="mailto:Brian@eelpo.com">汪洪州</a>
 * @since 1.0
 */
public class SimpleContainer extends Panel {
	private static final long serialVersionUID = 9123292190617647829L;

	public SimpleContainer(String id, String title) {
		super(id, new Model<String>(title));

		// 标题
		add(renderTitleLabel("title"));

		// 内容
		add(renderContent("content"));

	}

	public Label renderTitleLabel(final String id) {
		return new Label(id, getDefaultModelObjectAsString());
	}

	public WebMarkupContainer renderContent(final String id) {
		return new WebMarkupContainer(id);
	}
}
